﻿using System;
using System.Text;
using System.Web.Mvc;

namespace BoneSystem.Extensions
{
    public static class ControlExtensions
    {
        public static MvcHtmlString MenuLink(string text, string url)
        {
            var build = new TagBuilder("a");
            build.InnerHtml = text;
            build.Attributes.Add("onclick", String.Format("RequestPage({0})",url));
            return new MvcHtmlString(build.ToString(TagRenderMode.EndTag));
        }
    }
}